package com.app.brilliant.game.service.impl;

import com.app.brilliant.common.service.impl.BaseServiceImpl;
import com.app.brilliant.game.bean.WxConfig;
import com.app.brilliant.game.service.WxConfigService;
import com.app.brilliant.game.mapper.WxConfigMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;

/**
* @author GF
* @description 针对表【wx_config】的数据库操作Service实现
* @createDate 2025-07-28 15:01:52
*/
@Service
public class WxConfigServiceImpl extends BaseServiceImpl<WxConfigMapper, WxConfig>
implements WxConfigService{

    @Override
    public String getConfigValue(String key) {
        LambdaQueryWrapper<WxConfig> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(WxConfig::getKey, key);
        WxConfig wxConfig = this.getOne(queryWrapper);
        return wxConfig != null ? wxConfig.getValue() : null;
    }
}
